package com.ruoyi.boss.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.boss.mapper.MembershipLevelsMapper;
import com.ruoyi.boss.domain.MembershipLevels;
import com.ruoyi.boss.service.IMembershipLevelsService;

/**
 * 新建会员等级Service业务层处理
 * 
 * @author rui
 * @date 2025-08-18
 */
@Service
public class MembershipLevelsServiceImpl implements IMembershipLevelsService 
{
    @Autowired
    private MembershipLevelsMapper membershipLevelsMapper;

    /**
     * 查询新建会员等级
     * 
     * @param levelId 新建会员等级主键
     * @return 新建会员等级
     */
    @Override
    public MembershipLevels selectMembershipLevelsByLevelId(Long levelId)
    {
        return membershipLevelsMapper.selectMembershipLevelsByLevelId(levelId);
    }

    /**
     * 查询新建会员等级列表
     * 
     * @param membershipLevels 新建会员等级
     * @return 新建会员等级
     */
    @Override
    public List<MembershipLevels> selectMembershipLevelsList(MembershipLevels membershipLevels)
    {
        return membershipLevelsMapper.selectMembershipLevelsList(membershipLevels);
    }

    /**
     * 新增新建会员等级
     * 
     * @param membershipLevels 新建会员等级
     * @return 结果
     */
    @Override
    public int insertMembershipLevels(MembershipLevels membershipLevels)
    {
        return membershipLevelsMapper.insertMembershipLevels(membershipLevels);
    }

    /**
     * 修改新建会员等级
     * 
     * @param membershipLevels 新建会员等级
     * @return 结果
     */
    @Override
    public int updateMembershipLevels(MembershipLevels membershipLevels)
    {
        return membershipLevelsMapper.updateMembershipLevels(membershipLevels);
    }

    /**
     * 批量删除新建会员等级
     * 
     * @param levelIds 需要删除的新建会员等级主键
     * @return 结果
     */
    @Override
    public int deleteMembershipLevelsByLevelIds(Long[] levelIds)
    {
        return membershipLevelsMapper.deleteMembershipLevelsByLevelIds(levelIds);
    }

    /**
     * 删除新建会员等级信息
     * 
     * @param levelId 新建会员等级主键
     * @return 结果
     */
    @Override
    public int deleteMembershipLevelsByLevelId(Long levelId)
    {
        return membershipLevelsMapper.deleteMembershipLevelsByLevelId(levelId);
    }
}
